<template>
	<view class="u-demo">
		<uni-list>
			<uni-list-item v-for="(item,index) in list" :title="item.title" :thumb="base+item.cover">
				
			</uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	import api from 'commer/apiURL.js'
	export default {
		data() {
			return {
				base: api.baseurl,
				list :[]
			}
		},
		onLoad(options) {
			this.getxin(options.name)
		},
		methods: {
			getxin(name){
				console.log(name)
				this.$get(this.base + '/prod-api/press/press/list').then((res) => {
					let news = res.rows
					this.list = news.filter((item)=>{
						if(item.title.indexOf(name) >= 0){
							return item
						}
					})
					console.log(this.list)
				})
			},
		}
	}
</script>

<style>

</style>
